package com.chj.design.sk;

// https://blog.csdn.net/rocketeerLi/article/details/82016407
public class Code18_Facade {
	public static class Father {
		public void driveCar() {
			System.out.println("小明的爸爸在开车");
		}
	}

	public static class Mother {
		public void cook() {
			System.out.println("小明的妈妈在做饭");
		}
	}

	public static class XiaoMing {
		public void washDishes() {
			System.out.println("小明在洗碗");
		}
	}

	public static class Facade {
		XiaoMing xiaoMing = new XiaoMing();
		Father father = new Father();
		Mother mother = new Mother();

		public void driveCar() {
			this.father.driveCar();
		}

		public void cook() {
			this.mother.cook();
		}

		public void washDishes() {
			this.xiaoMing.washDishes();
		}
	}

	public static void main(String[] args) {
		Facade fac = new Facade();
		fac.driveCar();
		fac.cook();
		fac.washDishes();
	}
}
